'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    // 修改 status 列的 ENUM 值
    await queryInterface.sequelize.query(
      'ALTER TABLE `friendships` MODIFY COLUMN `status` ENUM("pending", "accepted", "rejected") DEFAULT "pending"'
    );
  },

  async down(queryInterface, Sequelize) {
    // 恢复原来的 ENUM 值
    await queryInterface.sequelize.query(
      'ALTER TABLE `friendships` MODIFY COLUMN `status` ENUM("pending", "accepted", "blocked") DEFAULT "pending"'
    );
  }
};
